package com.xiangmo.travel.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xiangmo.travel.Entity.Community;
import org.springframework.stereotype.Repository;

/**
* @author a1304
* @description 针对表【community】的数据库操作Mapper
* @createDate 2023-03-19 23:37:40
* @Entity generator.Entity.Community
*/
@Repository
public interface CommunityMapper extends BaseMapper<Community> {
    Page<Community> selectAllByType(@Param("page") Page<Community> page, @Param("type") String type);
    //根据用户id查询该用户发过的帖子
    Page<Community> selectAllByUserId(@Param("page") Page<Community> page, @Param("userId") Long userId);
}
